//
// Created by jsjxsy on 2022/7/5.
//
#include <stdio.h>
#define GET_TYPENAME(var) _Generic((var), \
int:"int",\
char:"char",\
float:"float",\
double :"double",\
char * :"char *",\
default:"other type")

int main(){
  int x;
  int* x1;
  char s[10];
  printf("type: x = %s \n", GET_TYPENAME(x));
  printf("type: x1 = %s \n", GET_TYPENAME(x1));
  printf("type: xs = %s \n", GET_TYPENAME(s));
  return 0;
}
